<?php
	class FaxianAction extends BaseAction {
		/*
		public function __construct(){
			parent::__construct();
		}
		*/
		public function faxian_list(){
			$m['is_del'] = 0;
			$m['status'] = 1;
			$list = D('company_faxian')->where($m)->order('ctime desc')->findpage(20);
			foreach ($list['data'] as $k => &$v) {
				$v['pic'] = get_img_url($v['pic']);
				$v['text'] = mb_substr($v['text'],0,30,'utf-8');
			}
			$this->assign('list',$list);
			$this->display();
		}
		public function faxian_info(){
			$m['fid'] = $_GET['fid'];
			$list = D('company_faxian')->where($m)->find();
			$da['check'] = $list['check']+1;
			D('company_faxian')->where($m)->save($da);
			$list['pic'] = get_img_url($list['pic']);
			$hirings = D('hiring')->where(array('cid'=>$list['cid'],'is_del'=>0,'status'=>1))->order('updateline desc')->limit(5)->select();
			$list['hirings'] = $hirings;
			$this->assign('list',$list);
			$this->display();
		}
	}
?>